

const supportedSuffixNames = {
  ".docx": true,
  ".doc": true,

};
// 是否是当前组件支持预览的d文档格式
export const validateFileType = (suffix: string) => {
  const lastIndex = suffix.lastIndexOf(".");
  if (lastIndex === -1) {
    return false;
  }
  const suf = suffix.slice(lastIndex, suffix.length);

  return typeof supportedSuffixNames[suf] === "boolean" ? supportedSuffixNames[suf] : false;
};
